#ifndef ENEMY2_H
#define ENEMY2_H
#include "config.h"
#include "bullet2.h"
#include <QPixmap>

class Enemy2
{
public:
    Enemy2();

    /* 更新敌机坐标 */
    void updatePosition();

    /* 射击与图片切换 */
    void shoot();

public:

    //敌机资源
    QPixmap m_Plane;
    QPixmap m_PlaneHit;
    QPixmap m_PlaneDown[ENEMY2_DOWN_NUM];
    QPixmap *p_Plane;

    //坐标
    int m_X;
    int m_Y;

    //速度
    int m_Speed;

    //矩形框
    QRect m_Rect;

    //是否闲置
    bool m_Free;

    //爆炸状态
    int m_Down;

    //图片切换/攻击间隔计数
    int m_Interval;

    //生命
    int m_life;

    //弹夹
    Bullet2 m_Bullets[BULLET2_NUM];

};

#endif // ENEMY2_H

